#if defined _td_pocket_natives_included
	#endinput
#endif

#define _td_pocket_natives_included

#include "td_pocket.inl"

new const pocketNatives[][] = {
	"set_player_pocket_limit",
	"add_to_pocket",
	"set_pocket",
	"get_pocket",
	"take_from_pocket_menu"
}

stock register_def_pocket_natives(){
	
	new count = sizeof(pocketNatives);
	
	for(new i=0;i<count;i++) 
		register_def_pocket_native(i);
}

stock register_def_pocket_native(i){
	new nat[32];
	new name[64];
	new len = charsmax(name);
	nat[0] = '^0';
	formatex(nat, 31, "_%s", pocketNatives[i]);
	name[0] = '^0';
	formatex(name, len, "%s_%s", prefix, nat);
	register_native(name, nat);
}

public _set_player_pocket_limit(iPlugin, iParams){
	new id = get_param(1);
	new item = get_param(2);
	new limit = get_param(3);
	
	td_set_player_pocket_limit(id,limit, item);
}

public _add_to_pocket(iPlugin, iParams){
	new id = get_param(1);
	new item = get_param(2);

	td_add_to_pocket(id, item);
}

public _set_pocket(iPlugin, iParams){
	new id = get_param(1);
	new item = get_param(2);
	new count = get_param(3);

	td_set_pocket(id, item, count);
}
public _get_pocket(iPlugin, iParams){
	new id = get_param(1);
	new item = get_param(2);
	
	return playerPocketItems[id][item];
}

public _take_from_pocket_menu(iPlugin, iParams){
	new id = get_param(1);
	
	td_pocket_menu(id);
}



